#include <stdio.h>

int f(int n);

int main()
{
    int n, k = 0;
    scanf("%d", &n);
    if (n > 1)
    {
        while (f(n) != 1)
        {
            k++;
            n = f(n);
        }
        k++;
    }
    printf("%d", k);

    return 0;
}

int f(int n)
{
    if (n % 2 == 0)
    {
        n = n / 2;
    }
    else
    {
        n = 3 * n + 1;
    }
    return n;
}